IF EXISTS (SELECT * FROM sysobjects WHERE type = 'P' AND name = 'spTLifeinsur_RetrieveAll')
	BEGIN
		PRINT 'Dropping Procedure spTLifeinsur_RetrieveAll'
		DROP  Procedure  spTLifeinsur_RetrieveAll
	END

GO

PRINT 'Creating Procedure spTLifeinsur_RetrieveAll'
GO

CREATE Procedure spTLifeinsur_RetrieveAll
	(
		@lifeinsur varchar(50) = null
	)
AS
    /* 
    ------------------------------------------------------------------------------
    - Change History
    - --------------
    - Date          Description
    ------------------------------------------------------------------------------
    - 8/23/2007	Initial version created
    ------------------------------------------------------------------------------
    */
	
	SET NOCOUNT ON
	
	-- Retrieve the relevant records
	SELECT  *
	FROM	TLifeinsur
	
	WHERE	(@lifeinsur IS NULL OR TLifeinsur.lifeinsur LIKE @lifeinsur + '%')

	-- Return to calling method
	RETURN
GO
